package com.xframe.domain.knowledgeBase;

import com.xframe.domain.BaseModel;
import com.xframe.xdal.core.annotation.AutoFill;
import com.xframe.xdal.core.annotation.XBelongsTo;
import com.xframe.xdal.core.annotation.XColumn;
import com.xframe.xdal.core.annotation.XTable;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain=true)
@XTable(value = "equipment_info", label = "设备表")
@XBelongsTo(typeName = "com.xframe.domain.knowledgeBase.EquipmentTree",foreignKey = "emTree", targetKey = "id",as = "refEmTree")
public class EquipmentInfo extends BaseModel {

    /**
     * 主键ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "id",primaryKeyFlag = true,uniqueFlag = true,desc = "设备ID")
    private Long id;

    @XColumn(name = "em_tree",desc = "设备树ID")
    private Long emTree;

    private EquipmentTree refEmTree;
}
